package my.webservices.model.util;

import java.lang.management.ManagementFactory;

import javax.management.MBeanServer;
import javax.management.ObjectName;

public class DataSetupAgent {

	// Run using following VM args
	// -Dcom.sun.management.jmxremote.port=9999
	// -Dcom.sun.management.jmxremote.authenticate=false
	// -Dcom.sun.management.jmxremote.ssl=false
	public static void main(String[] args) throws Exception {
		MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
		ObjectName name = new ObjectName(
				"my.webservices.model.util:type=DataSetup");
		DataSetupMBean mbean = new DataSetup();
		mbs.registerMBean(mbean, name);

		System.out.println("Waiting forever...");
		Thread.sleep(Long.MAX_VALUE);
	}

}
